﻿package com.jfdesgagne.jfdesgagne09.shell.view.component {
	import flash.display.Sprite;
	import flash.display.BitmapData;
	import flash.events.Event;
	
	public class Background extends Sprite {
		private var _trame_sp:Sprite;
		private var _image1_sp:Sprite;
		private var _image2_sp:Sprite;
		private var _mask_sp:Sprite;
				
		public function init():void {
			this._trame_sp = new Sprite();
			this.addChild(this._trame_sp);
			
			this._mask_sp = new Sprite();
			this.addChild(this._mask_sp);
			
			this._trame_sp.mask = this._mask_sp;
		}
		
		public function setMask():void {
			this._mask_sp.graphics.clear();
			this._mask_sp.graphics.beginFill(0x000000, 1);
			this._mask_sp.graphics.drawRect(0, 0, this.stage.stageWidth, this.stage.stageHeight);
			this._mask_sp.graphics.endFill();
		}
		
		public function setTrame():void {
			this._trame_sp.graphics.clear();
			this._trame_sp.graphics.beginBitmapFill(new TrameBmp(0, 0));
			this._trame_sp.graphics.drawRect(0, 0, this.stage.stageWidth, this.stage.stageHeight);
			this._trame_sp.graphics.endFill();
		}
	}
	
}